//! \file Gui.h
//! \brief TODO: Document
// -----------------------------------------------------------------------------
//! This program is free software; you can redistribute it and/or
//! modify it under the terms of the GNU General Public License
//! as published by the Free Software Foundation; either version 2
//! of the License, or (at your option) any later version.
//!
//! This program is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with this program; if not, write to the Free Software Foundation,
//! Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// -----------------------------------------------------------------------------
#ifndef dGUI_H_
#define dGUI_H_

#include <SDL/SDL.h>
#include <CEGUI.h>
#include "Core.h"
//  #include "Error.h"

//#ifdef __cplusplus
//  extern "C"
//  {
//#endif

namespace GUI {

// TODO: delete
//  // =============================================================================
//  //! \enum eGuiError
//  //! \brief TODO: comment
//  // -----------------------------------------------------------------------------
//  typedef enum
//  {
//    eGUI_ERROR_NONE,          //!< TODO: comment
//    eGUI_ERROR_SOME_FAILURE,  //!< TODO: comment
//  } eGuiError;

  // TODO: comment
  class GUI
  {
    public:

      // ===== [ Public Members ]===============================================

      // ===== [ Public Methods ]===============================================
      static tERROR Start(void);
      static tERROR Stop(tERROR Error);




      // TODO: remove for testing purposes
      static int DisplayTask(void* Data);

    private:

      // ===== [ Private Members ]==============================================


        // SDL
      static SDL_Surface *m_pSurface;
//      static SDL_Surface* pImage;

        // CEGUI
      static CEGUI::WindowManager *m_pWm;   //!< The CEGUI window manager.
      // static CEGUI::System *d_system;       // the gui system
      static CEGUI::Window *m_pRoot;        //!< The CEGUI root window.
      static CEGUI::Font *m_pFont;          //!< The CEGUI default font.

      // ===== [ Private Methods ]==============================================
      static tERROR InitSDL(void);
      static tERROR InitOpenGL(void);
      static tERROR InitCEGUI(void);
      static tERROR CreateCEGUIResourceProvider(void);
      static tERROR CreateCEGUIRoot(void);

      static tERROR NewWindowConsole(CEGUI::Window *pParent);
      static tERROR NewWindowAbout(CEGUI::Window *pParent);

      static tERROR NewMenuMain(CEGUI::Window *pParent);

      static tERROR NewMenuItemFile(CEGUI::Window *pParent);
      static tERROR NewMenuItemHelp(CEGUI::Window *pParent);

      static bool fileAbout(const CEGUI::EventArgs&);
      static bool fileQuit(const CEGUI::EventArgs&);


  };

} // namespace GUI

//  #ifdef __cplusplus
//    }
//  #endif

#endif // dGUI_H_

